Conversation
There was a problem hiding this comment.
PR Overview
This pull request fixes the Storybook build by removing any reliance on the Node "path" module in stories. The change removes the import from "path" and replaces the usage of path.join with a template literal for constructing the yamlPath.
Changes
| File | Description |
|---|---|
| extensions/ql-vscode/test/factories/model-editor/extension-pack.ts | Removed Node "path" dependency to support Storybook build |
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
extensions/ql-vscode/test/factories/model-editor/extension-pack.ts:9
- While the template literal approach avoids importing 'path', it may not handle platform-specific file separators (e.g., Windows '\' vs UNIX '/'). If cross-platform compatibility is required, consider an alternative solution that preserves this behavior without importing 'path'.
yamlPath: `${path}/codeql-pack.yml`,
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
robertbrignull
left a comment
There was a problem hiding this comment.
LGTM
Should build-storybook be added to .github/workflows/main.yml with the other build/linting CI jobs so we don't break it again in future?
That's a good idea. I can definitely add that, we can even publish the stories to GitHub Pages. I'll do that in a follow-up PR though since it's unrelated to this. |
This fixes
npm run build-storybookby ensuring we're not importing anything from thepathmodule in stories.